package com.wx.plugin.util;

import java.util.Map;
import java.util.Set;

/**
 * <p></p>
 *
 * @author  yangz
 * @date    2016/10/28
 * @version latest
 */
public class CollectionUtil {

    public static String mapToString(Map<String, Object> map, String division){
        if(map != null){
            StringBuilder sb = new StringBuilder();
            Set<Map.Entry<String, Object>> set = map.entrySet();
            sb.append(division + "----" + division);
            for (Map.Entry entry : set) {
                sb.append(entry.getKey() + " : " + entry.getValue() + division);
            }
            sb.append("----");
            return sb.toString();
        }else{
            return null;
        }
    }

}
